package com.gzhryc.shared_device.oem.code.agent.dao.enums;

public class AgentRelationEnum {

	/**
	 * 这里的角色用于权限控制
	 */
	public static enum RoleType {

		Partner(3, "合伙人")		//与ERoleType的Partner枚举Index保持一致
		, Dealer(98, "经销商");

        private Integer index;
        private String note;

        RoleType(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
        	RoleType[] temp = RoleType.values();
            for (int i = 0; i < temp.length; i++) {
            	RoleType item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }
	
	public static enum PowerType {

		CanUndeployDevice(3,"是否移除部署");

        private String note;
        private Integer roleType;

        PowerType(Integer roleType,String note) {
        	this.roleType = roleType;
            this.note = note;
        }
        
        public Integer roleType() {
        	return roleType;
        }

        public String note() {
            return note;
        }
    }
}
